-- GENERATED SPELL FOR [Blackwind Warp Chaser] --


function spell0_23219(pUnit, Event) --@Phasing Invisibility,Self--
pUnit:FullCastSpellOnTarget(32942,pUnit)
pUnit:RegisterEvent('Sorts_23219', 0, 1)
end

function spell1_23219(pUnit, Event) --@Venomous Bite,n/a--
pUnit:FullCastSpellOnTarget(32739,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23219', 10000, 1)
end

function spell2_23219(pUnit, Event) --@Warp Charge,n/a--
pUnit:FullCastSpellOnTarget(37417,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23219', 1327, 1)
end

function Sorts_23219(pUnit, Event)
local choix_sorts_23219 = math.random(0, 2)
if choix_sorts_23219 == 0 then
pUnit:RegisterEvent('spell0_23219', 1, 1)
end
if choix_sorts_23219 == 1 then
pUnit:RegisterEvent('spell1_23219', 1, 1)
end
if choix_sorts_23219 == 2 then
pUnit:RegisterEvent('spell2_23219', 1, 1)
end
end

function mob23219_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23219', math.random(1500, 3000), 1)
end

function mob23219_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23219_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23219_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23219, 1, 'mob23219_Action')
RegisterUnitEvent(23219, 2, 'mob23219_Leave')
RegisterUnitEvent(23219, 3, 'mob23219_Kill')
RegisterUnitEvent(23219, 4, 'mob23219_Die')
